package com.example.ruralservicedigitalplatform.mapper;

import com.example.ruralservicedigitalplatform.domain.dto.OrdersPageQueryDto;
import com.example.ruralservicedigitalplatform.domain.po.Orders;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface OrderMapper {
//    @Insert("insert into orders( order_number, total_price, payment_type, pay_status, villager_id, order_status, deliveryman_id, address_id, order_time, update_time, create_user, update_user, phone, address, consignee, cancel_reason, rejection_reason, cancel_time, estimated_delivery_time, remark, delivery_status, delivery_time)" +
//            " values             (#{orderNumber},#{totalPrice},#{paymentType},#{payStatus},#{villagerId},#{orderStatus},#{deliverymanId},#{addressId},#{orderTime},#{updateTime},#{createUser},#{updateUser},#{phone},#{address},#{consignee},#{cancelReason},#{rejectionReason},#{cancelTime},#{estimatedDeliveryTime},#{remark},#{deliveryStatus},#{deliveryTime})")
    void insert(Orders orders);

    Page<Orders> pageQuery(OrdersPageQueryDto ordersPageQueryDto);
}
